package com.atguigu.gmall.oms.api;

import com.atguigu.gmall.common.bean.ResponseVo;
import com.atguigu.gmall.oms.entity.OrderEntity;
import com.atguigu.gmall.oms.vo.OrderSubmitVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Aupt
 * @create 2022-06-14-9:38
 */
public interface GmallOmsApi {

    @PostMapping("oms/order/{userId}")
    ResponseVo<OrderEntity> saveOrder(
            @RequestBody OrderSubmitVO orderSubmitVO,
            @PathVariable("userId") Long userId);

    @GetMapping("oms/order/order/{orderToken}")
    ResponseVo<OrderEntity> queryOrderByToken(@PathVariable("orderToken") String orderToken);
}
